package fourzerofour.guoshixu.day04;

public class Vehicle {
    private double speed;
    private String type;

    Vehicle(double speed){
        this.speed = speed;
    }

    Vehicle(double speed,String type){
        this.speed = speed;
        this.type = type;
    }



    Vehicle(){

    }

    public String getType(){
        return this.type;
    }

    public void setSpeed(double speed){
        this.speed = speed;
    }

    public double getSpeed(){
        return this.speed;
    }

    public double speedUp(double speed){
        this.speed += speed;

        return this.speed;
    }

    public void speedDown(double speed){
        this.speed -= speed;
    }



}
